﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ActiveStoryTouch.DataModel;

namespace ASTouchService
{
    public class SessionManager
    {
        public Guid SessionId { get; set; }
        public Project CurrentProject { get; set; }
        public Page CurrentPage { get; set; }
        public static GestureManager CommonGestureManager { get; set; }
        public static SessionSettings CurrentSessionSettings { get; set; }

        public SessionManager()
        {
            // TODO: Add code to refer to the correct directory (*server*/App_Data)
            CurrentProject = Project.LoadFromFile(ServerPathHelpers.GetAbsoluteDataPath("TestProject.astprojx"));
            if (CommonGestureManager == null)
                CommonGestureManager = GestureManager.LoadFromFile(ServerPathHelpers.GetAbsoluteDataPath("Gestures.xml"));
            if (CurrentSessionSettings == null)
                CurrentSessionSettings = SessionSettings.LoadFromFile(ServerPathHelpers.GetAbsoluteDataPath("SessionSettings.xml"));
        }
    }
}
